<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="60" />

<title>Check Message</title>
</head>

<body>
<%
set fs=server.CreateObject("scripting.filesystemobject")
filepath=server.MapPath("access/backend/Message.txt")
set tf=fs.opentextfile(filepath,1,true)
msg=tf.readline
msg=replace(msg,"_"," ")
tf.close
set tf=nothing
set fs=nothing
%>
<script type="text/vbscript">
set m=parent.document.getElementById("MsgToUsers")
m.innerhtml="<%= msg %>"
</script>

<%
userlist=split(application("users"),"|")
HSuser=request.Cookies("HSuser")
found=0
x=0
if HSuser<>"" then
	do until x> ubound(userlist)
		if userlist(x)=HSuser then
			found=1
		end if
		x=x+1
	loop
end if

if found=0 then 
	%>
	<script type="text/vbscript">
		parent.document.frames("main").location="LoginScreen.asp"
	</script>
	<%
end if
%>
</body>
</html>